package com.weiai.wedding.dao.cases;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import com.weiai.wedding.entity.cases.Resources;
/**
 * 资源DAO类
 * @author xushunxin
 *
 */
public interface ResourcesDao extends PagingAndSortingRepository<Resources,Long>{

	@Query("select r from Resources r where r.status = 'A'   ")
	Page<Resources> findResourcesList(Pageable pager);
	
	@Query("select r from Resources r where r.status = 'A' and r.resourcesName like :resourcesName ")
	Page<Resources> findResourcesListByName(@Param("resourcesName")String resourcesName,Pageable pager);
	
}
